#pragma once

#ifdef WIN32
#include <windows.h>
#endif

#include <math.h>

class ColorPlane
{
public:

	ColorPlane();
	ColorPlane(int H, int W, int Deep);
	ColorPlane(ColorPlane& a);

	void create(int H, int W, int Deep);
	ColorPlane& operator = (ColorPlane* Second);
	ColorPlane* operator + (ColorPlane* Second);
	ColorPlane* operator - (ColorPlane* Second);
	ColorPlane* operator * (ColorPlane* Second);
	void mult(double number);
	void summ(double number);
	
	double findClosest(double temp);
	void SetArea(int H,int W);
	double GetPixel(int x,int y);
	double GetPixel(int i);
	void SetPixel(int x, int y, double temp);
	void SetPixel(int i, double temp);
	int GetSize();
	int GetW();
	int GetH();
	void Neg();
	double GetAvr();
	void SetToConst(double a);
	
	//void Convolution(CMask* mask);
	//void Convolution_min(int size);
	//void Convolution_max(int size);
	//void Convolution_med_cross(int size);
	//void Convolution_med_square(int size);
	//void Convolution_med_round(int size);
	double * ColorPlane::GetPlaneAdress();

	double AvaerageBr();

	void Potent();

	~ColorPlane();


protected:
	int H,W;
	int H_in,W_in;
	int Deep;
	double* Plane;


};
